3.1333 \(\int \frac{(A+B x) (d+e x)}{a+c x^2} \, dx\)

Optimal. Leaf size=64 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (A c d-a B e)}{\sqrt{a} c^{3/2}}+\frac{\log \left (a+c x^2\right ) (A e+B d)}{2 c}+\frac{B e x}{c} \]

[Out]

(B*e*x)/c + ((A*c*d - a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*c^(3/2)) + ((
B*d + A*e)*Log[a + c*x^2])/(2*c)

_______________________________________________________________________________________

Rubi [A]  time = 0.109265, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (A c d-a B e)}{\sqrt{a} c^{3/2}}+\frac{\log \left (a+c x^2\right ) (A e+B d)}{2 c}+\frac{B e x}{c} \]

Antiderivative was successfully verified.

[In]  Int[((A + B*x)*(d + e*x))/(a + c*x^2),x]

[Out]

(B*e*x)/c + ((A*c*d - a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*c^(3/2)) + ((
B*d + A*e)*Log[a + c*x^2])/(2*c)

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{e \int B\, dx}{c} + \frac{\left (A e + B d\right ) \log{\left (a + c x^{2} \right )}}{2 c} + \frac{\left (A c d - B a e\right ) \operatorname{atan}{\left (\frac{\sqrt{c} x}{\sqrt{a}} \right )}}{\sqrt{a} c^{\frac{3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)*(e*x+d)/(c*x**2+a),x)

[Out]

e*Integral(B, x)/c + (A*e + B*d)*log(a + c*x**2)/(2*c) + (A*c*d - B*a*e)*atan(sq
rt(c)*x/sqrt(a))/(sqrt(a)*c**(3/2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.107701, size = 65, normalized size = 1.02 \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e-A c d)}{\sqrt{a} c^{3/2}}+\frac{\log \left (a+c x^2\right ) (A e+B d)}{2 c}+\frac{B e x}{c} \]

Antiderivative was successfully verified.

[In]  Integrate[((A + B*x)*(d + e*x))/(a + c*x^2),x]

[Out]

(B*e*x)/c - ((-(A*c*d) + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*c^(3/2)) +
 ((B*d + A*e)*Log[a + c*x^2])/(2*c)

_______________________________________________________________________________________

Maple [A]  time = 0.005, size = 78, normalized size = 1.2 \[{\frac{Bex}{c}}+{\frac{\ln \left ( c{x}^{2}+a \right ) Ae}{2\,c}}+{\frac{\ln \left ( c{x}^{2}+a \right ) Bd}{2\,c}}+{dA\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}-{\frac{aBe}{c}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)*(e*x+d)/(c*x^2+a),x)

[Out]

B*e*x/c+1/2/c*ln(c*x^2+a)*A*e+1/2/c*ln(c*x^2+a)*B*d+1/(a*c)^(1/2)*arctan(c*x/(a*
c)^(1/2))*A*d-1/c/(a*c)^(1/2)*arctan(c*x/(a*c)^(1/2))*a*B*e

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*(e*x + d)/(c*x^2 + a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.276063, size = 1, normalized size = 0.02 \[ \left [-\frac{{\left (A c d - B a e\right )} \log \left (-\frac{2 \, a c x -{\left (c x^{2} - a\right )} \sqrt{-a c}}{c x^{2} + a}\right ) -{\left (2 \, B e x +{\left (B d + A e\right )} \log \left (c x^{2} + a\right )\right )} \sqrt{-a c}}{2 \, \sqrt{-a c} c}, \frac{2 \,{\left (A c d - B a e\right )} \arctan \left (\frac{\sqrt{a c} x}{a}\right ) +{\left (2 \, B e x +{\left (B d + A e\right )} \log \left (c x^{2} + a\right )\right )} \sqrt{a c}}{2 \, \sqrt{a c} c}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*(e*x + d)/(c*x^2 + a),x, algorithm="fricas")

[Out]

[-1/2*((A*c*d - B*a*e)*log(-(2*a*c*x - (c*x^2 - a)*sqrt(-a*c))/(c*x^2 + a)) - (2
*B*e*x + (B*d + A*e)*log(c*x^2 + a))*sqrt(-a*c))/(sqrt(-a*c)*c), 1/2*(2*(A*c*d -
 B*a*e)*arctan(sqrt(a*c)*x/a) + (2*B*e*x + (B*d + A*e)*log(c*x^2 + a))*sqrt(a*c)
)/(sqrt(a*c)*c)]

_______________________________________________________________________________________

Sympy [A]  time = 3.6361, size = 212, normalized size = 3.31 \[ \frac{B e x}{c} + \left (\frac{A e + B d}{2 c} - \frac{\sqrt{- a c^{3}} \left (- A c d + B a e\right )}{2 a c^{3}}\right ) \log{\left (x + \frac{A a e + B a d - 2 a c \left (\frac{A e + B d}{2 c} - \frac{\sqrt{- a c^{3}} \left (- A c d + B a e\right )}{2 a c^{3}}\right )}{- A c d + B a e} \right )} + \left (\frac{A e + B d}{2 c} + \frac{\sqrt{- a c^{3}} \left (- A c d + B a e\right )}{2 a c^{3}}\right ) \log{\left (x + \frac{A a e + B a d - 2 a c \left (\frac{A e + B d}{2 c} + \frac{\sqrt{- a c^{3}} \left (- A c d + B a e\right )}{2 a c^{3}}\right )}{- A c d + B a e} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)*(e*x+d)/(c*x**2+a),x)

[Out]

B*e*x/c + ((A*e + B*d)/(2*c) - sqrt(-a*c**3)*(-A*c*d + B*a*e)/(2*a*c**3))*log(x
+ (A*a*e + B*a*d - 2*a*c*((A*e + B*d)/(2*c) - sqrt(-a*c**3)*(-A*c*d + B*a*e)/(2*
a*c**3)))/(-A*c*d + B*a*e)) + ((A*e + B*d)/(2*c) + sqrt(-a*c**3)*(-A*c*d + B*a*e
)/(2*a*c**3))*log(x + (A*a*e + B*a*d - 2*a*c*((A*e + B*d)/(2*c) + sqrt(-a*c**3)*
(-A*c*d + B*a*e)/(2*a*c**3)))/(-A*c*d + B*a*e))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.277415, size = 80, normalized size = 1.25 \[ \frac{B x e}{c} + \frac{{\left (B d + A e\right )}{\rm ln}\left (c x^{2} + a\right )}{2 \, c} + \frac{{\left (A c d - B a e\right )} \arctan \left (\frac{c x}{\sqrt{a c}}\right )}{\sqrt{a c} c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*(e*x + d)/(c*x^2 + a),x, algorithm="giac")

[Out]

B*x*e/c + 1/2*(B*d + A*e)*ln(c*x^2 + a)/c + (A*c*d - B*a*e)*arctan(c*x/sqrt(a*c)
)/(sqrt(a*c)*c)